<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>密码修改</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/css/bootstrap-datetimepicker.min.css}" rel="stylesheet">
    <link href="https://cdn.bootcdn.net/ajax/libs/limonte-sweetalert2/6.6.2/sweetalert2.min.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link th:href="@{/css/dashboard.css}" rel="stylesheet">
    <style type="text/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .chartjs-render-monitor {
            -webkit-animation: chartjs-render-animation 0.001s;
            animation: chartjs-render-animation 0.001s;
        }
    </style>
</head>
<body>
<!--顶部导航栏-->
<div th:replace="~{commons/commons::topbar}"></div>

<div class="container-fluid">
    <div class="row">
        <!--将侧边栏抽取为公共部分-->
        <div th:replace="~{commons/commons::sidebar(active='user/pwd.html')}"></div>

        <div class="info" style="color: lawngreen" th:if="${message != null}">[[${message}]]</div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <form th:action="@{/user/pwdUpdate}" method="post" class="form-horizontal offset-4">
                <input type="hidden" name="method" value="savepwd">
                <!--<input type="hidden" name="id" th:value="${user.id}">-->
                <div class="form-group">
                    <label for="userCode" class="col-sm-2 control-label">用户名</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" style="width:250px;" name="userCode" id="userCode" placeholder="Username" th:value="${usercode}">
                        <span id="usernameTip" style="display:none;color:red;"></span>
                    </div>
                </div>
                <div class="form-group">
                    <label for="oldpassword" class="col-sm-2 control-label">旧密码</label>
                    <div class="col-sm-10">
                        <input type="password" class="form-control" style="width:250px;" name="oldpassword" id="oldpassword" placeholder="Old Password">
                        <font color="red" class="oldTip"></font>
                    </div>
                </div>
                <div class="form-group">
                    <label for="newpassword" class="col-sm-2 control-label">新密码</label>
                    <div class="col-sm-10">
                        <input type="password" class="form-control" style="width:250px;" name="newpassword" id="newpassword" placeholder="New Password">
                        <font color="red"></font>
                    </div>
                </div>
                <div class="form-group">
                    <label for="rnewpassword" class="col-sm-4 control-label">确认新密码</label>
                    <div class="col-sm-10">
                        <input type="password" class="form-control" style="width:250px;" name="rnewpassword" id="rnewpassword" placeholder="Again New Password">
                        <font color="red"></font>
                    </div>
                </div>
                <div class="form-group">
                    <button type="button" class="btn btn-primary save" name="save" id="save" style="text-align:center;">确认修改</button>
                    <label class="col-lg-1"></label>
                    <button type="reset" class="btn btn-info" style="text-align:center; width: 90px;">重置</button>
                </div>
            </form>
        </main>
    </div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" th:src="@{/js/jquery-3.2.1.min.js}"></script>
<script type="text/javascript" th:src="@{/js/popper.min.js}"></script>
<script type="text/javascript" th:src="@{/js/bootstrap.min.js}"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/limonte-sweetalert2/6.6.2/sweetalert2.min.js"></script>
<script type="text/javascript" th:src="@{/js/pwdmodify.js}"></script>

</body>
</html>